<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>程序猿之友——代码生成助手</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet"/>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo"><a style="color: white" href="/"><img th:src="@{/images/yaojingcai-logo.png}" class="layui-nav-img">代码自动生成</a></div>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href=""> <i class="layui-icon layui-icon-group"></i> 代码自动生成</a>
                    <dl class="layui-nav-child">
                        <dd><a class="iframe-address" href="javascript:;" data-src="/ctrl/config">配置</a></dd>
                        <dd><a class="iframe-address" href="javascript:;" data-src="/ctrl/generator">生成</a></dd>
                    </dl>
                </li>
                <!--<li class="layui-nav-item">-->
                    <!--<a href="javascript:;"><i class="layui-icon layui-icon-set"></i></a>-->
                <!--&lt;!&ndash;    <dl class="layui-nav-child">-->
                        <!--<dd><a class="iframe-address" href="javascript:;" data-src="/bs/stockout">代码生成</a></dd>-->
                    <!--</dl>&ndash;&gt;-->
                <!--</li>-->
     <!--           <li class="layui-nav-item">
                    <a href="javascript:;"> <i class="layui-icon  layui-icon-fire"></i> 风控管理</a>
                    <dl class="layui-nav-child">
                        <dd><a class="iframe-address" href="javascript:;" data-src="/risk/datamaxid">数据抓取公司配置</a></dd>
                        <dd><a class="iframe-address" href="javascript:;" data-src="/risk/receiveinfo">收货信息查询</a></dd>

                    </dl>
                </li>-->
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
            <div id="loading_block" align="center" style="display: none">
                <i  class="layui-icon layui-icon-loading layui-anim layui-anim-rotate layui-anim-loop" style="font-size: 80px"></i>
                <p>loading……</p>
            </div>
        </div>
        <iframe frameborder="0" scrolling="yes" style="width: 100%;height: 100%" src="" ></iframe>
    </div>

    <div class="layui-footer">
        <!-- 底部固定区域 -->
        <!--<b>店铺ID：</b> <span id="myVenderId" th:text="${mySupplierInfo.venderId}"></span> <b>公司名称：</b> <span th:text="${mySupplierInfo.company}"></span>-->
    </div>
</div>
<script th:src="@{~/layui/layui.js}" charset="UTF-8"></script>
<script th:src="@{~/js/jquery.min.js}" charset="UTF-8"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;
    });

    $(function () {
        $("a.iframe-address").on("click",function () {
            var venderid= $("#myVenderId").text();
            var href=$(this).attr("data-src")+"/"+venderid;
            $("#loading_block").show();
            $("iframe").attr("src",href);
            $("iframe").on("load",function () {
                $("#loading_block").hide();
            })
        })
    })

</script>
</body>
</html>